local CTRL = require("Login/LoginCtrl")

local Module = {}

function Module:Init()
    -- 注册按钮监听事件...
    -- 初始化UI界面参数
    ViewManager:AddClickEvent(self, "Login", CTRL.doBtnLogin)
    ViewManager:AddClickEvent(self, "Choose", CTRL.doBtnChoose)
    ViewManager:AddClickEvent(self, "Close", CTRL.doClosePanel)
    ViewManager:SetText(self, "Title", "登录界面")

    self.form:OnRecivedUIMsg("Login", function(msg, sender)
        print(sender .. "窗口发来的消息:" .. msg)
    end)
end

function Module:Show(viewName)
    local config = {
        _DTAnimIn = DTAnimEffect.FadeIn,
        _DTAnimOut = DTAnimEffect.FadeOut,
        _NotCloseByOther = true
    }
    ViewManager:ShowFormAndInit(self, viewName, config)
end

function Module.Start(go)
    print("游戏对象名字：" .. go.name)
end

return Module
